import { fetchGet, fetchPost, fetchPut, fetchDel, fetchGetDown, fetchPostUp } from '@/axios'
const exam = {
  // 分页查询所有
  getExamList (page, num) {
    return fetchPost(`/api/ExamManager/selectAll?page=${page}&num=${num}`)
  },
  // 删除
  delInfo (examId) {
    return fetchPost(`/api/ExamManager/delete?examId=${examId}`)
  },
  // 模糊查询
  findInfo (page, num, query) {
    return fetchPost('/api/ExamManager/selectManager', query, {
      page,
      num
    })
  },
  // 更新
  newOne (params) {
    return fetchPost('/api/ExamManager/update', params)
  },
  //  新增
  addOne (params) {
    return fetchPost('/api/ExamManager/addExam', params)
  },
  //  问题
  searchQuestion (questionCategory) {
    return fetchGet(`/api/ExamManager/selectQuestion?questionCategory=${questionCategory}`)
  },
  //   题目
  questionQuestion () {
    return fetchGet('/api/QuestionCategory/getName')
  },
  // 查询单个考试
  selectOneExam (examId) {
    return fetchPost(`/api/ExamManager/selectOneExam?examId=${examId}`)
  }
}

export default exam
